<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>设置视频【{$video.title}】所属比赛 <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button></h2>
    </div>
    <div class="tab-content">
    <notempty name="inMatch">
    <label class="item-label" style="color: red">该视频已经设置在比赛: 【<a href="{:U('Match/video?id='.$inMatch['id'])}">{$inMatch.title}</a>】 下面, 可点击进入比赛进行管理</label>
    <else />
    <form action="" method="post" class="form">
        <div class="form-item form-group">
            <label class="item-label">最近比赛 (没有请到全部列表选择)</label>
            <div class="form-item form-group">
                <volist name="match" id="m" offset="0" length='5'>
                    <label class="radio-inline">
                        <input type="radio" name="race_id1" value="{$m.id}" /> {$m.title}【{$m.detail|default="--"}】
                    </label>
                </volist>
            </div>
        </div>   
        <div class="form-item form-group">
                <label class="item-label">全部列表</label>
                <select name="race_id" class="form-control">
                    <option value="">--请选择比赛--</option>
                    <volist name="match" id="m">
                        <option value="{$m.id}">
                        {$m.title}【{$m.detail|default="--"}】  
                        </option>
                    </volist>
                </select>
        </div>
        <div class="form-item form-group">
                <label class="item-label">时间结点</label>
                <input class="text form-control input-small" name="time" value="" placeholder="填写如00:00">
        </div>
        <div class="form-item form-group form-action">
            <input type="hidden" name="id" value="{$id}">
            <button class="btn btn-success submit-btn ajax-post" id="submit" type="submit" target-form="form">确 定</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
    </notempty>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Video/index')}');
        showTab();
    </script>
</block>
